package br.inf.solutions.apresentacoes.ssp.view.composer;

import org.springframework.context.annotation.Scope;

import br.com.vexillum.util.ReflectionUtils;
import br.com.vexillum.util.SpringFactory;
import br.inf.solutions.apresentacoes.ssp.control.ResourceController;
import br.inf.solutions.apresentacoes.ssp.model.Resource;
import br.inf.solutions.apresentacoes.ssp.view.composer.basicforms.BasicFormsComposer;

@SuppressWarnings("serial")
@org.springframework.stereotype.Component
@Scope("prototype")
public class ResourceComposer extends BasicFormsComposer<Resource, ResourceController> {

	@Override
	protected String getUpdatePage() {
		return "/paginas/recurso/modalCadastrar.zul";

	}

	@Override
	public ResourceController getControl() {
		return SpringFactory.getController("resourceController",
				ResourceController.class,
				ReflectionUtils.prepareDataForPersistence(this));
	}

	@Override
	public Resource getEntityObject() {
		return new Resource();
	}

}
